'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = (app) => {
    const { router, controller } = app;
    router.get('/', controller.home.index);

    // 添加备忘录接口
    router.post('/memos', controller.memo.create);
    router.get('/memos', controller.memo.index);
    router.get('/memos/:id', controller.memo.detail);
    router.put('/memos/:id', controller.memo.update);
    router.delete('/memos/:id', controller.memo.destroy);
};
